{"version":3,"file":"jsx-runtime.cjs.js","sources":["../src/jsx-runtime.ts"],"sourcesContent":["/**\n * actjs/jsx-runtime — React 17+ automatic JSX transform.\n * Consumers configure:\n *   \"jsx\": \"react-jsx\"\n *   \"jsxImportSource\": \"actjs\"\n * in their tsconfig. TypeScript then imports jsx/jsxs/Fragment from this file.\n */\n\nimport { h, Fragment as ActFragment } from './hyperscript.js';\nimport type { Child, Props, SVGProps } from './types.js';\n\nexport { ActFragment as Fragment };\n\n// ─── JSX type declarations ────────────────────────────────────────────────────\n// TypeScript reads the exported JSX namespace from the jsxImportSource module.\n// It must be a named export — declare global does NOT work for jsxImportSource.\n\nexport declare namespace JSX {\n  type Element = globalThis.Element | DocumentFragment;\n\n  interface IntrinsicElements {\n    // ── SVG elements — typed presentation & geometry attributes ──────────────\n    svg: SVGProps;\n    path: SVGProps;\n    circle: SVGProps;\n    ellipse: SVGProps;\n    line: SVGProps;\n    polyline: SVGProps;\n    polygon: SVGProps;\n    rect: SVGProps;\n    g: SVGProps;\n    defs: SVGProps;\n    use: SVGProps;\n    symbol: SVGProps;\n    tspan: SVGProps;\n    text: SVGProps;\n    clipPath: SVGProps;\n    mask: SVGProps;\n    pattern: SVGProps;\n    linearGradient: SVGProps;\n    radialGradient: SVGProps;\n    stop: SVGProps;\n    filter: SVGProps;\n    marker: SVGProps;\n    // ── Catch-all for HTML and unknown elements ───────────────────────────────\n    [tagName: string]: Props & { children?: Child | Child[] };\n  }\n}\n\ntype JSXProps = Props & { children?: Child | Child[] };\n\n/**\n * jsx() — called for elements with a single child (or no children).\n * The automatic transform passes children inside props.\n */\nexport function jsx(\n  type: string | ((...args: unknown[]) => Element | DocumentFragment | void),\n  props: JSXProps,\n  _key?: string,\n): Element | DocumentFragment {\n  const { children, ...rest } = props;\n  const childArray: Child[] = children === undefined\n    ? []\n    : Array.isArray(children) ? children : [children];\n  return h(type, rest as Props, ...childArray);\n}\n\n/**\n * jsxs() — called for elements with multiple children (array).\n * Identical implementation — children is already an array.\n */\nexport function jsxs(\n  type: string | ((...args: unknown[]) => Element | DocumentFragment | void),\n  props: JSXProps,\n  _key?: string,\n): Element | DocumentFragment {\n  return jsx(type, props, _key);\n}\n\n/**\n * jsxDEV() — called in development builds; same as jsx().\n */\nexport function jsxDEV(\n  type: string | ((...args: unknown[]) => Element | DocumentFragment | void),\n  props: JSXProps,\n  _key?: string,\n): Element | DocumentFragment {\n  return jsx(type, props, _key);\n}\n"],"names":["jsx","type","props","_key","children","rest","childArray","h","jsxs","jsxDEV"],"mappings":"8HAuDO,SAASA,EACdC,EACAC,EACAC,EAC4B,CAC5B,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAA,EAASH,EACxBI,EAAsBF,IAAa,OACrC,GACA,MAAM,QAAQA,CAAQ,EAAIA,EAAW,CAACA,CAAQ,EAClD,OAAOG,IAAEN,EAAMI,EAAe,GAAGC,CAAU,CAC7C,CAMO,SAASE,EACdP,EACAC,EACAC,EAC4B,CAC5B,OAAOH,EAAIC,EAAMC,CAAW,CAC9B,CAKO,SAASO,EACdR,EACAC,EACAC,EAC4B,CAC5B,OAAOH,EAAIC,EAAMC,CAAW,CAC9B"}